'use strict'
export function ExampleFunc(name) {
    if (!(this instanceof ExampleFunc)) {
        throw new TypeError("Class constructor ExampleFunc cannot be invoked without 'new'!");
    }
    this.name = name;
}
ExampleFunc.prototype.func = function () {
    console.log(this.name);
}

Object.defineProperty(ExampleFunc.prototype, 'func', {
    value: function () {
        if (!(this instanceof ExampleFunc)) {
            throw new TypeError("Class constructor ExampleFunc cannot be invoked without 'new'!");
        }
        console.log(this.name);
    },
    enumerable: false
});
